<include file="Public:head" title='工时详情' />
<script src="__PUBLIC__/js/other/validate.js"></script>
<script>
    $(function() {
        $("#form").validate({
            errorPlacement: function(error, element) {
                var error_td = element.parent('td');
                error_td.find('label.error').hide();
                error_td.append(error);
            },
            rules: {
                hour: {
                    required: true,
                    max: 23,
                    number: true
                },
                minutes: {
                    max: 59,
                    number: true
                }
            },
            messages: {
                hour: {
                    required: "工时不能为空",
                    max: "最多23小时",
                    number: "必须为数字"
                },
                minutes: {
                    max: '最多59分钟',
                    number: "必须为数字"
                }
            }
        });
        $.getScript("__PUBLIC__/js/plugins/kind2/kindeditor-min.js", function() {
            KindEditor.basePath = '__PUBLIC__/js/plugins/kind2/';
            KindEditor.create('textarea[id="content"]');
        });
    })

</script>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Hours/lists')}">工时管理</a></li>
                    <li class="active">工时{$Think.get.id|getPageType}</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">工时{$Think.get.id|getPageType}</h3>

                                <form action="{:U('Hours/detail_post')}" method="POST" id="form" enctype="multipart/form-data">
                                    <table class="table table_detail">
                                        <tbody>
                                            <tr>
                                                <td class="td_left">当前日期</td>
                                                <td>
                                                    <strong style="font-size: 16px">{$today}</strong>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">工作内容</td>
                                                <td>
                                                    <textarea id="content" name="content" rows="25" cols="80">{$detail.content|htmlspecialchars_decode}</textarea>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left">工作时长</td>
                                                <td>
                                                    <input name="hour" type="text" class="common_txt"  value="{$hour}" style="width:60px;"/> 时
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="td_left"></td>
                                                <td>

                                                    <input name="minutes" type="text" class="common_txt"  value="{$minutes}" style="width:60px;"/> 分钟
                                                </td>
                                            </tr>



                                            <tr>
                                                <td class="td_left"></td>
                                                <td>
                                                    <input type='hidden' name='id' value='{$Think.get.id}'/>
                                                    <button class="btn btn-info btn-sm" type="submit">
                                                        <i class="icon-ok bigger-110 "></i>
                                                        保 存
                                                    </button>
                                                    <button class="btn btn-sm reset" type="button" onclick="goUrl(-1)">
                                                        <i class="icon-undo bigger-110"></i>
                                                        返 回
                                                    </button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:logo_upload" />
    </div>
</div>
<include file="Public:foot" />
